<?php
include_once "../inc_function.php";

	$id = $_POST['id'];
//	exit;
		
	$stmt = oci_parse($con,'BEGIN PKG_ANNOUNCEMENT.DELETE_ANNOUNCEMENT(:id);END;');
	oci_bind_by_name($stmt,':id',$id);
	oci_execute($stmt,OCI_DEFAULT);
	oci_free_statement($stmt);         			

	$stmt = oci_parse($con,'BEGIN PKG_ANNOUNCEMENT.DELETE_DETAIL_ANNOUNCEMENT(:id);END;');
	oci_bind_by_name($stmt,':id',$id);
	oci_execute($stmt,OCI_DEFAULT);
	oci_free_statement($stmt);         			
	
	$r = oci_commit($con);
	// Commit the changes to both tables
	if (!$r) 
	{					
    	$e = oci_error($con);
		oci_rollback($con);
		echo false;
	}else{
		echo true;
	}								
	